<?php foreach ($tickets as $key=>$item) : ?>
<div class="buy-xin" data-goods-id="<?php echo $item->goods_id; ?>">
    <div class="buy-name flex">
        <p class="am-text-truncate flex-1"><?php echo $item->goods_name; ?></p>
        <a href="javascript:;" class="ord-delete"><i class="iconfont">&#xe611;</i></a>
    </div>
    <div class="flex">
        <div class="buy-Price flex-1 flex">
            <p>单价</p>
            <i><span>￥</span><em><?php echo $item->market_price; ?></em></i>
        </div>
        <div class="buy-num flex">
            <div class="num-title">数量</div>
            <div class="num-text flex flex-1">
                <span class="num-minus">-</span>
                <input type="text" name="buyticket[<?php echo $item->goods_id ?>][buy_num]" value="1" onkeyup="this.value=this.value.replace(/\D/g,'')"  data-min="<?php echo ($item->min_number > 0) ? $item->min_number : 1 ?>" data-max="<?php echo $item->limit_sfz_number ? $item->limit_sfz_number : $item->limit_number ?>" data-goods-id="<?php echo $item->goods_id ?>" class="num-input">
                <span class="num-add">+</span>
            </div>
        </div>
    </div>
</div>
<?php endforeach; ?>